package router

import (
	"cgs-server/server"
	"cgs-server/server/cgs/app/api"
	"cgs-server/server/cgs/app/store/mongo"
)

func initWorksheetGroupRouter() {
	storeIns, _ := mongo.GetMongoFactory()

	groupHandler := api.NewWorksheetGroupHandler(storeIns)

	server.Get("/api/app/worksheet/group/get", groupHandler.Get, "", server.Login)
	server.Post("/api/app/worksheet/group/delete", groupHandler.Delete, "", server.Login)
	server.Post("/api/app/worksheet/group/save", groupHandler.Save, "", server.Login)
	server.Post("/api/app/worksheet/group/update", groupHandler.Update, "", server.Login)
	server.Post("/api/app/worksheet/group/update-worksheet-sort", groupHandler.Update, "", server.Login)
}
